package com.system.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Set;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * <p>
 * 教师表
 * </p>
 *
 * @author zfc
 * @since 2023-04-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ToString
@ApiModel(value="Teacher对象", description="教师表")
public class Teacher implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "教师ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户名（登陆账号）")
    private String username;

    @ApiModelProperty(value = "密码（登陆密码）")
    private String password;

    @ApiModelProperty(value = "教师姓名")
    private String name;

    @ApiModelProperty(value = "电话")
    private String tel;

    @ApiModelProperty(value = "性别")
    private String gender;

    @ApiModelProperty(value = "是否已删除（0未删除 1已删除）")
    private Integer isDelete;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createDate;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.UPDATE)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime modifyDate;

    @ApiModelProperty(value = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private String creator;

    @ApiModelProperty(value = "修改人")
    @TableField(fill = FieldFill.UPDATE)
    private String modifier;

    @ApiModelProperty(value = "备注")
    private String remark;

    @TableField(exist = false)
    public Set<Role> roleList;

    public Teacher (Integer id,Integer isDelete){
        this.setId(id);
        this.setIsDelete(isDelete);
    }
    public Teacher(){

    }

}
